<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>列表页面</title>
</head>
<body class="laytp-container">
<div id="search-form" style="display:none;">
    <div class="layui-layer-title">搜索</div>
    <form class="layui-form search-form-body" lay-filter="layui-form" style="margin-top:20px;">
        <div class="layui-form-item layui-inline">
            <label class="layui-form-label" title="题库">题库</label>
            <div class="layui-input-inline">
                <div class="xmSelect"
                     data-name="search_param[bid][value]"
                     data-sourceType="route"
                     data-radio="true"
                     data-source='{{.__API_PREFIX__}}books'
                     data-selected=""
                ></div>
                <input type="hidden" name="search_param[bid][condition]" value="=">
            </div>
        </div>

        <div class="layui-form-item layui-inline">
            <label class="layui-form-label" title="名称">名称</label>
            <div class="layui-input-inline">
                <input autocomplete="off" type="text" id="name" name="search_param[name][value]" placeholder="请输入名称" class="layui-input">
                <input type="hidden" name="search_param[name][condition]" value="LIKE">
            </div>
        </div>

        <div class="layui-form-item layui-inline">
            <label class="layui-form-label" title="创建时间">创建时间</label>
            <div class="layui-input-inline">
                <input type="text" class="layui-input laydate" id="create_time" name="search_param[create_time][value]"
                       data-type="datetime"
                       data-isRange="true"
                       placeholder="请选择创建时间">
                <input type="hidden" name="search_param[create_time][condition]" value="BETWEEN">
            </div>
        </div>

        <div class="bottom">
            <div class="button-container">
                <button class="laytp-btn laytp-btn-primary laytp-btn-sm" lay-submit="" lay-filter="laytp-search-form">
                    <i class="layui-icon layui-icon-ok"></i>
                    提交
                </button>
                <button type="button" class="laytp-btn laytp-btn-sm laytp-search-form-reset">
                    <i class="layui-icon layui-icon-refresh"></i>
                    重置
                </button>
            </div>
        </div>
    </form>
</div>
<div class="layui-card">
    <div class="layui-card-body">
        <table id="laytp-table" lay-filter="laytp-table"></table>
    </div>
</div>

<script type="text/html" id="default-toolbar">
    {{.__START__}} if(facade.hasAuth("{{.__API_PREFIX__}}edit") || facade.hasAuth("{{.__API_PREFIX__}}del")){ {{.__END__}}
    <div class="dropdown-menu">
        <button class="laytp-btn laytp-btn-primary laytp-btn-md">
            <i class="layui-icon layui-icon-triangle-d"></i>
            批量操作
        </button>
        <ul class="dropdown-menu-nav layui-anim-upbit dropdown-bottom-left layui-anim">
            <div class="dropdown-anchor"></div>
            {{.__START__}} if(facade.hasAuth("{{.__API_PREFIX__}}edit")){ {{.__END__}}
            <li><a lay-event="edit"><i class="layui-icon layui-icon-edit"></i>编辑</a></li>
            {{.__START__}} } {{.__END__}}
            {{.__START__}} if(facade.hasAuth("{{.__API_PREFIX__}}del")){ {{.__END__}}
            <li><a lay-event="del"><i class="layui-icon layui-icon-delete"></i>删除</a></li>
            {{.__START__}} } {{.__END__}}
        </ul>
    </div>
    {{.__START__}} } {{.__END__}}
    {{.__START__}} if(facade.hasAuth("{{.__API_PREFIX__}}add")){ {{.__END__}}
    <button class="laytp-btn laytp-btn-danger laytp-btn-md" lay-event="add">
        <i class="layui-icon layui-icon-add-1"></i>
        新增
    </button>
    {{.__START__}} } {{.__END__}}
    <button class="laytp-btn laytp-btn-warming laytp-btn-md" lay-event="search">
        <i class="layui-icon layui-icon-search"></i>
        搜索
    </button>
</script>

<script type="text/html" id="default-bar">
    {{.__START__}} if(facade.hasAuth("{{.__API_PREFIX__}}edit")){ {{.__END__}}
    <button class="laytp-btn laytp-btn-primary laytp-btn-xs" lay-event="edit"><i class="layui-icon layui-icon-edit"></i>编辑</button>
    {{.__START__}} } {{.__END__}}
    {{.__START__}} if(facade.hasAuth("{{.__API_PREFIX__}}del")){ {{.__END__}}
    <button class="laytp-btn laytp-btn-danger laytp-btn-xs" lay-event="del"><i class="layui-icon layui-icon-delete"></i>删除</button>
    {{.__START__}} } {{.__END__}}
</script>

<script>
    if(localStorage.getItem("staticDomain")){
        document.write("<link rel='stylesheet' href='" + localStorage.getItem("staticDomain") + "/component/laytp/css/laytp.css?v=" + localStorage.getItem("version") + "'>");
        document.write("<script src='" + localStorage.getItem("staticDomain") + "/component/layui/layui.js?v="+localStorage.getItem("version")+"'><\/script>");
        document.write("<script src='" + localStorage.getItem("staticDomain") + "/component/laytp/layuiConfig.js?v="+localStorage.getItem("version")+"'><\/script>");
        document.write("<script src='/static/component/jquery_3.3.1.js?v="+localStorage.getItem("version")+"'><\/script>");
        document.write("<script src='/static/component/jquery.tablednd.js?v="+localStorage.getItem("version")+"'><\/script>");
        document.write("<script src='{{.__JSPATH__}}'><\/script>");
    }else{
        document.write("<link rel='stylesheet' href='/static/component/laytp/css/laytp.css?v=" + localStorage.getItem("version") + "'>");
        document.write("<script src='/static/component/layui/layui.js?v="+localStorage.getItem("version")+"'><\/script>");
        document.write("<script src='/static/component/laytp/layuiConfig.js?v="+localStorage.getItem("version")+"'><\/script>");
        document.write("<script src='/static/component/jquery_3.3.1.js?v="+localStorage.getItem("version")+"'><\/script>");
        document.write("<script src='/static/component/jquery.tablednd.js?v="+localStorage.getItem("version")+"'><\/script>");
        document.write("<script src='{{.__JSPATH__}}'><\/script>");
    }

</script>
</body>
</html>